﻿using Hangfire;
using IRealize;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;

namespace WebApplication9.Controllers
{
    public class MainController : Controller
    {
        private IEmailService _emailService;
        public MainController( IEmailService emailService)
        {
            _emailService = emailService;
        }
        public IActionResult Index()
        {
            /*var optios = new RecurringJobOptions() 
            {
                TimeZone=TimeZoneInfo.Local
            }; 
            try 
            {
                RecurringJob.AddOrUpdate("job名",()=> _emailService.SendEmail("Recurring Job", DateTime.Now.ToLongTimeString()),Cron.Monthly);*/
                return View();
            /*}
            catch 
            {
                Console.WriteLine("错误");
                return StatusCode(500,"错误");
            }*/
            
        }
    }
}
